﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Miao.UI;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;


public class DragLayoutPro : DragLayout
{
    public Vector2 BaseLocalPosition { get; set; }
    public override void OnBeginDrag(PointerEventData eventData)
    {
        base.OnBeginDrag(eventData);
        ((DragLayoutGroupPro)dragLayoutGroup).SqueezeAsideStart(this);
        //StartCoroutine(INextSqueezeStart());

       
    }
    public IEnumerator INextSqueezeStart()
    {
        yield return new WaitForEndOfFrame();
        ((DragLayoutGroupPro)dragLayoutGroup).SqueezeAsideStart(this);
    }


    public override void OnDrag(PointerEventData eventData)
    {
        base.OnDrag(eventData);
        ((DragLayoutGroupPro)dragLayoutGroup).SqueezeAside(this);
    }
    public override void OnEndDrag(PointerEventData eventData)
    {
        base.OnEndDrag(eventData);
    }
}

